#ifndef __CZF_TOOLBAR_H__
#define __CZF_TOOLBAR_H__

#include "SimpleWnd.h"
#include <commctrl.h>

class CToolBar : public CWnd
{
public:
   CToolBar();
   ~CToolBar();
   
   BEGIN_MSG_MAP(CToolBar)
   END_MSG_MAP()
   
   HWND Create(HWND hParentWnd, 
               RECT& rcPos,
               UINT nToolBarID,
               DWORD dwCtrlStyle = TBSTYLE_TOOLTIPS | TBSTYLE_FLAT | CCS_NOPARENTALIGN|CCS_NODIVIDER|CCS_NORESIZE, 
               DWORD dwStyle = WS_CHILD | WS_VISIBLE);
   BOOL LoadToolBar(UINT uBitmapID);

   BOOL SetButtonState(UINT idButton, UINT uState);

protected:
   BOOL SetButtonSize (WORD wWidth, WORD wHeight);
   BOOL SetBitmapSize (WORD wWidth, WORD wHeight);
   int LoadBitmap(UINT uBitmapID, WORD wCount);
   BOOL AddButtons(int nBitmapIdx, const WORD* pwID, WORD wCount);
       
public:
   bool     m_bLoaded;
   int      m_uButtonWidth;
   int      m_uButtonHeight;
};
#endif
